<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Komite Pengawas Perpajakan',

	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
                'application.modules.user.models.*',
                'application.extensions.*',

	),

	'defaultController'=>'post',

        // application modules
        'modules'=>array(
            'user' => array(
            'debug' => false
            ),
            'gii'=>array(
		'class'=>'system.gii.GiiModule',
		'password'=>'yii'
            ),
        ),

	// application components
	'components'=>array(
                'user'=>array(
                    'class' => 'application.modules.user.components.WebUser',
                    'allowAutoLogin'=>true,
                    'loginUrl' => array('/user/user/login'),
		),
		//'db'=>array(
		//	'connectionString' => 'sqlite:protected/data/blog.db',
		//	'tablePrefix' => 'tbl_',
		//),
		// uncomment the following to use a MySQL database
		
		'db'=>array(
			'connectionString' => 'mysql:host=localhost;dbname=kpp',
			'emulatePrepare' => true,
			'username' => 'root',
			'password' => '',
			'charset' => 'utf8',
			//'tablePrefix' => 'tbl_',
		),

		
		'errorHandler'=>array(
			// use 'site/error' action to display errors
            'errorAction'=>'site/error',
        ),

//        'urlManager'=>array(
//                        'showScriptName'=>false, // enable this (false) when .htaccess takes effect on the host
//                        'urlFormat'=>'path',
//                        'rules'=>array(
//                                'tag/<tag>'=>'post/list',
//                                'posts'=>'post/list',
//                                'post/<id:\d+>'=>'post/show',
//                                'post/update/<id:\d+>'=>'post/update',
//                                'date/<time:\d+>'=>'post/PostedOnDate',
//                                'month/<time:\d+>/<pnc:p|c|n>'=>'post/PostedInMonth',
//                                'rss.xml'=>'post/feed',
//                        ),
//                ),
            'widgetCollapse'=>array(
                    'class'=>'WidgetCollapse',
                    'enable'=>true,
            ),
            'highslide'=>array(
                    'class'=>'Highslide',
                    'enable'=>true,
            ),
//            'timer'=>array(
//                    'class'=>'Timer',
//            ),
            'clientScript'=>array(
                                  /*
                                  'class'=>'application.components.ExtendedClientScript',
                                  'combineFiles'=>true,
                                  'compressCss'=>true,
                                  'compressJs'=>true,
                                  */
            ),

        /*
        'urlManager'=>array(
        	'urlFormat'=>'path',
        	'rules'=>array(
        		'post/<id:\d+>/<title:.*?>'=>'post/view',
        		'posts/<tag:.*?>'=>'post/index',
        		'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
        	),
        ),*/
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
				// uncomment the following to show log messages on web pages
				/*
				array(
					'class'=>'CWebLogRoute',
				),
				*/
			),
		),
	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>require(dirname(__FILE__).'/params.php'),
);